package com.kdl.webconfig.business;

import com.kdl.webconfig.vo.config.ButtonConfigVO;
import com.kdl.webconfig.converter.PojoConvert;
import com.kdl.webconfig.entity.ButtonConfig;
import com.kdl.webconfig.service.IButtonConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 王成杰
 * @description TODO
 * @date 2022-09-15 下午5:53
 */
@Component
public class ButtonConfigBusiness {


    @Autowired
    private IButtonConfigService iButtonConfigService;

    public Boolean saveOrUpdate(ButtonConfigVO buttonConfigVO){
        ButtonConfig buttonConfig = PojoConvert.parseButtonConfig(buttonConfigVO);
        return iButtonConfigService.saveOrUpdate(buttonConfig);
    }

    public Boolean deleteById(Integer id) {
       return iButtonConfigService.removeById(id);
    }
}
